﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Optimization;

namespace RelaxUI
{
    public class ResourseBundle
    {
        /// <summary>
        /// 注册脚本样式BUNDLE
        /// </summary>
        /// <param name="bundles"></param>
        public static void RegisterBundles(BundleCollection bundles)
        {
            string path = GlobalConfig.GetUIBasePath();
            var bundle = BundleTable.Bundles.GetBundleFor("~/basecss");
            if (bundle == null)
                bundles.Add(new StyleBundle("~/basecss").Include(
                             path + "/themes/default/easyui.css"));

            bundle = BundleTable.Bundles.GetBundleFor(path + "/themes/css");
            if (bundle == null)
                bundles.Add(new StyleBundle(path + "/themes/css").Include(path + "/themes/icon.css"));


            bundle = BundleTable.Bundles.GetBundleFor("~/basejs");
            if (bundle == null)
                bundles.Add(new ScriptBundle("~/basejs").Include(
                            path + "/jquery.min.js", path + "/jquery.easyui.min.js"));
        }
    }
}
